package com.eliza.kotlin.design.creation.factory.abstract_5

/**
 * @version v1.0
 * @ClassName: Client
 * @Description: TODO(一句话描述该类的功能)
 * @Author: 黑马程序员
 */
object Client {
    @JvmStatic
    fun main(args: Array<String>) {
        //创建的是意大利风味甜品工厂对象
        //ItalyDessertFactory factory = new ItalyDessertFactory();
        val factory = AmericanDessertFactory()
        //获取拿铁咖啡和提拉米苏甜品
        val coffee = factory.createCoffee()
        val dessert = factory.createDessert()
        println(coffee.name)
        dessert.show()
    }
}